package com.gopay.common.domain.cloud;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Version;

/**
 * 云平台账户状态记录表
 * ZhangZG
 * 2015年12月29日 
 * www.gopay.com.cn Inc.All rights reserved.
 */
@Entity
@Table(name = "CLOUD_ACCT_STAT_LOG")
public class CloudAcctStatLog implements Serializable {
	private static final long serialVersionUID = 7563563445077647390L;
	/**
	 * 国付宝流水号
	 */
	private Integer   sq;
	/**
	 * 网关流水号
	 */
	private Integer   transDtlSq;
	/**
	 * 协议号
	 */
	private String   agreeId;   
	/**
	 * 商户流水号
	 */
	private String   merOrderId; 
	/**
	 * 01、收付锁定02、收款锁定03、付款锁定04、解锁
	 */
	private String   lockType;
	/**
	 * 交易状态,00成功，02进行中，01失败
	 */
	private String   stat;   
	/**
	 * 国付宝交易时间
	 */
	private Date   tranDateTime;
	private Integer   version;      
	private Date   createTs;   
	private Date   lastUpdTs;
	
	@Id
    @Column(name = "SQ")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "cloud_acct_stat_log_seq")
    @SequenceGenerator(name = "cloud_acct_stat_log_seq", allocationSize = 1, initialValue = 1, sequenceName = "cloud_acct_stat_log_seq")
	public Integer getSq() {
		return sq;
	}
	public void setSq(Integer sq) {
		this.sq = sq;
	}

	@Column(name = "TRANS_DTL_SQ")
	public Integer getTransDtlSq() {
		return transDtlSq;
	}
	public void setTransDtlSq(Integer transDtlSq) {
		this.transDtlSq = transDtlSq;
	}

	@Column(name = "AGREE_ID")
	public String getAgreeId() {
		return agreeId;
	}
	public void setAgreeId(String agreeId) {
		this.agreeId = agreeId;
	}

	@Column(name = "MER_ORDER_ID")
	public String getMerOrderId() {
		return merOrderId;
	}
	public void setMerOrderId(String merOrderId) {
		this.merOrderId = merOrderId;
	}

	@Column(name = "LOCK_TYPE")
	public String getLockType() {
		return lockType;
	}
	public void setLockType(String lockType) {
		this.lockType = lockType;
	}

	@Column(name = "STAT")
	public String getStat() {
		return stat;
	}
	public void setStat(String stat) {
		this.stat = stat;
	}

	@Column(name = "TRAN_DATE_TIME")
	public Date getTranDateTime() {
		return tranDateTime;
	}
	public void setTranDateTime(Date tranDateTime) {
		this.tranDateTime = tranDateTime;
	}

	@Column(name = "VERSION")
	public Integer getVersion() {
		return version;
	}
	public void setVersion(Integer version) {
		this.version = version;
	}

	@Column(name = "CREATE_TS")
	public Date getCreateTs() {
		return createTs;
	}
	public void setCreateTs(Date createTs) {
		this.createTs = createTs;
	}

	@Version
	@Column(name = "LAST_UPD_TS")
	public Date getLastUpdTs() {
		return lastUpdTs;
	}
	public void setLastUpdTs(Date lastUpdTs) {
		this.lastUpdTs = lastUpdTs;
	}
	
	
	
	
	
}
